//
//  XKPictureCollectionCell.m
//  Selene
//
//  Created by 刘晓凯 on 2017/3/13.
//  Copyright © 2017年 hairun. All rights reserved.
//

#import "XKPictureCollectionCell.h"

@implementation XKPictureCollectionCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.pictureOne = [[XKTapImageView alloc] init];
        self.pictureOne.frame = CGRectMake(0, 0, frame.size.width, frame.size.height);
        self.pictureOne.backgroundColor = [UIColor redColor];
        self.pictureOne.contentMode = UIViewContentModeScaleAspectFill;
        [self.contentView addSubview:self.pictureOne];
        
        self.pictureTwo = [[XKTapImageView alloc] init];
        CGFloat pictureTwoHeight = (frame.size.height - sPictureItemSpacing) / 2.0;
        self.pictureTwo.frame = CGRectMake(0, (pictureTwoHeight + sPictureItemSpacing) , frame.size.width, pictureTwoHeight);
        self.pictureTwo.backgroundColor = [UIColor greenColor];
        self.pictureTwo.contentMode = UIViewContentModeScaleAspectFill;
        [self.contentView addSubview:self.pictureTwo];
        
        self.pictureOne.hidden = NO;
        self.pictureTwo.hidden = YES;
    }
    return self;
}

@end
